
package com.example.pfe_copie_finale;
import com.example.pfe_copie_finale.R;
import android.os.Bundle;
import android.app.Activity;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.RadioButton;
public class MainActivity extends Activity implements OnClickListener, android.view.View.OnClickListener{
	Button radio3 = null;
	Button radio2=null;
	Button radio1=null;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.bord);
        radio3= (Button)findViewById(R.id.radio3);
        radio3.setOnClickListener(this);
        radio2= (Button)findViewById(R.id.radio2);
        radio2.setOnClickListener(this);
        radio1= (Button)findViewById(R.id.radio1);
        radio1.setOnClickListener(this);
	}

	

public void onClick(View v) {
		if(v == radio3){
	Intent monIntent = new Intent(this,Magasinier.class);
	      startActivity(monIntent);}
		else
			if(v == radio2){
				Intent monIntent = new Intent(this,Commerciale.class);
				      startActivity(monIntent);}
			else
				
		if(v == radio1){
			Intent monIntent = new Intent(this,Administrateur.class);
			      startActivity(monIntent);}
		
}



@Override
public void onClick(DialogInterface arg0, int arg1) {
	
}
}